package com.brillilab.domain.enums.account;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 积分类型：1新建课题、2新建计划、3上传数据
 * @author lj
 *
 */
@Getter
@AllArgsConstructor
public enum IntegralTypeEnum {
	TOPIC("新建课题",1), PLAN("新建计划",2), EXPERIMENT("上传数据",3);
	public String name;
    private Integer value;
    
    public static String getKey(Integer value) {
        for (IntegralTypeEnum p : IntegralTypeEnum.values()) {
            if (p.getValue().equals(value)) {
                return p.name;
            }
        }
        return null;
    }
}